from luckin.common import valid_request_param
from luckin.models import Goods


def handle_goods(request):
    if not valid_request_param(request):
        return False, "参数错误"

    # get方法，_q的值为空，不需要进行校验数据
    goods_query_set = Goods.objects.all()
    return True, goods_query_set
